﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace RAD.LightOne
{
    #region Documentation
    /// <summary>
    /// Override da implmentação original de WeakReference, com adição de generics.
    /// </summary>
    #endregion
    public sealed class WeakReference<T> : WeakReference
    {
        #region Properties

        #region Documentation
        /// <summary>
        /// Define/Retorna o objeto (o alvo) referenciado pela instância corrente WeakObjectReference.
        /// </summary>
        #endregion
        public T Target
        {
            get { return (T) base.Target; }
            set { base.Target = value; }
        }

        #endregion

        #region Constructors

        public WeakReference(T target) : base(target) { }

        public WeakReference(T target, bool trackRessurection) : base(target, trackRessurection) { }

        #endregion
    }
}
